﻿Imports BUS
Imports DTO

Public Class frmDangNhap

    Public Shared QuyenHan As Integer
    Public Shared user As String 'ten dang nhap
    Public Shared pass As String 'password
    Public Shared dsSachTrongGio As New List(Of GioSach)
    Public Shared dsSachTra As New List(Of PhieuTra_DTO)


    Private Sub btnThoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThoat.Click
        Me.Close()
    End Sub

    Private Sub btnDangNhap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDangNhap.Click
        If TaiKhoan_BUS.CompareUserAndPass(txtTenDangNhap.Text, txtMatKhau.Text, QuyenHan) Then
            user = txtTenDangNhap.Text
            pass = txtMatKhau.Text
            Dim f As New frmThuVien
            f.Show()
            Me.Hide()
        End If
    End Sub

    Private Sub ĐăngKyToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ĐăngKyToolStripMenuItem.Click
        Dim f As New frmDangKy
        f.Show()
        Me.Hide()
    End Sub

    Private Sub QuênMâtKhâuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuênMâtKhâuToolStripMenuItem.Click
        Dim f As New frmQuenMatKhau
        f.Show()
        Me.Hide()
    End Sub

    Private Sub ThoatToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ThoatToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub frmDangNhap_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
